package business;

import java.util.List;

import dao.IRecommendationDAO;
import dao.JDBCRecommendationDAO;
import domain.Recommendation;

public class BusinessRecommendation {
	
	public static List<Recommendation> getAllRecommendations() {
		IRecommendationDAO recommendations=new JDBCRecommendationDAO();
		return recommendations.getAllRecommendations();
	}
	
	public static List<Recommendation> getAllRecommendationsByUser(String loginUser) {
		IRecommendationDAO recommendations=new JDBCRecommendationDAO();
		return recommendations.getAllRecommendationsByUser(loginUser);
	}
	
		
	public static Recommendation getRecomendationById(Integer idRecommendation) {
		IRecommendationDAO recommendations=new JDBCRecommendationDAO();
		return recommendations.getRecomendationById(idRecommendation);
	}
	
	public static void createRecomendation(Recommendation recomendacion){
		
		IRecommendationDAO recomendation = new JDBCRecommendationDAO();
		recomendation.createRecomendation(recomendacion);
		
	}
	
	public static Integer getNumberRecomendationsToUser(Integer idUser) {
		IRecommendationDAO recomendation = new JDBCRecommendationDAO();
		return recomendation.getNumberRecomendationsToUser(idUser);
	}
	
	public static Recommendation  noRecommmendation(Integer idVideo, Integer idUser2){
		IRecommendationDAO recommendations=new JDBCRecommendationDAO();
		return recommendations.noRecommmendation(idVideo,idUser2);
	}
	
}
